package com.note.app.dto;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.persistence.Column;
import lombok.Data;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 笔记DTO
 */
@Data
@Schema(description = "笔记信息")
public class NoteDTO {
    
    @Schema(description = "笔记ID", example = "1")
    private Long id;
    
    @Schema(description = "所属集合ID", example = "1")
    private Long collectionId;
    
    @Schema(description = "所属集合名称", example = "学习笔记")
    private String collectionName;
    
    @Schema(description = "创建用户ID", example = "1")
    private Long userId;
    
    @Schema(description = "创建用户名称", example = "张三")
    private String userName;
    
    @Schema(description = "笔记标题", example = "Spring Boot学习笔记")
    private String title;
    
    @Schema(description = "笔记内容(Markdown格式)", example = "# Spring Boot入门\n\n这是我的学习笔记...")
    private String content;
    
    @Schema(description = "图片地址", example = "https://example.com/image.jpg")
    private String icon;
    
    @Schema(description = "表情符号", example = "📝")
    private String emoji;
    
    @Schema(description = "版本号", example = "1")
    private Integer version;
    
    @Schema(description = "是否公开 0-私有 1-公开", example = "0")
    private Integer isPublic;
    
    @Schema(description = "阅读次数", example = "0")
    private Integer viewCount;
    
    @Schema(description = "标签列表")
    private List<TagDTO> tags;
    
    @Schema(description = "是否已分享", example = "true")
    private Boolean isShared;
    
    @Schema(description = "分享数量", example = "2")
    private Integer shareCount;
    
    @Schema(description = "分享ID", example = "123")
    private Long shareId;

    @Column(name = "created_at")
    @Schema(description = "创建时间", example = "2023-10-01T12:00:00")
    private LocalDateTime createdAt;

    @Column(name = "updated_at")
    @Schema(description = "更新时间", example = "2023-10-01T12:00:00")
    private LocalDateTime updatedAt;
} 